<div class="back-to-top">
  <span>
    <i class="fa fa-arrow-up"></i><span class="back-to-top-percent"></span>
  </span>
</div>
<footer>
    <p class="site-info">
        博客已运行<span id="time-to-now">328天10小时16分钟10秒</span><span class="my-face">(●'◡'●)ﾉ♥</span>
        <br>
        <a href="http://www.miibeian.gov.cn/state/outPortal/loginPortal.action" target="_blank">粤ICP备18028400号</a> | Powered by <a href="https://godbmw.com/">吕梁山</a>
        <br>
    </p>
</footer>
<script src="/static/js/canvas-nest-2.0.4.js" color="22,192,255" zindex="-1" opacity="0.7"
        count="99"></script>
<script>
    $(window).scroll(function () {
        var scrollTo = $(window).scrollTop();
        var docHeight = $(document).height();
        var bodyHight = $(document.body).height();
        var scrollPercent = (scrollTo / (docHeight - bodyHight)) * 100;
        scrollPercent = scrollPercent.toFixed(0);
        if (scrollPercent == 0) {
            $(".back-to-top").hide();
        } else {
            $(".back-to-top").show();
            $('.back-to-top-percent').text(scrollPercent + "%");
        }
    });
    // $(window).trigger('scroll');

    $(".back-to-top").click(function () {
        $('body,html').animate({scrollTop: 0}, 300);
        return false;
    })

    var startTimestamp = new Date(2019, 0, 3).getTime();
    setInterval(function(){
        var time = (new Date().getTime() - startTimestamp) / 1000
        var day = Math.floor(time / 86400)
        var hour = Math.floor((time % 86400) / 3600);
        var minute = Math.floor(((time % 86400) % 3600) / 60);
        var second = Math.floor(((time % 86400) % 3600) % 60);
        var showTime = day + "天" + hour + "小时" + minute + "分钟" + second + "秒";
        $("#time-to-now").text(showTime);
    }, 500);
</script>